﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.IO;

namespace Interview_Prov.Admin
{
    public partial class FixDb : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlConnection con=new SqlConnection(string.Format("Data Source=.\\SQLEXPRESS;AttachDbFilename={0};Integrated Security=True;User Instance=True", Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data\\Database1.mdf")));
            con.Open();
            SqlCommand command = new SqlCommand();
            command.Connection = con;
            command.CommandText = "DELETE FROM [RolesAssign]; DELETE FROM [PersonalInterviewResults]; DELETE FROM [Questions];  DELETE FROM [Interviews]; DELETE FROM [Users]";
            command.ExecuteNonQuery();
        }
    }
}